package com.example.mvvm.viewmodel;

import android.app.Application;
import android.os.Message;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.MediatorLiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.OnLifecycleEvent;
import androidx.viewpager.widget.PagerAdapter;

import com.example.mvvm.R;
import com.example.mvvm.activity.VideoPlayerActivity;
import com.example.mvvm.adapter.MainAdapter;
import com.example.mvvm.base.BaseViewModel;
import com.example.mvvm.base.livedata.StatusLiveEvent;
import com.example.mvvm.fragment.HomeFragment;
import com.example.mvvm.mode.ArticleMode;
import com.example.mvvm.utils.DebugUtils;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;

import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.schedulers.Schedulers;

public class MainViewModel extends BaseViewModel {

    private MutableLiveData<Integer> liveData = new MutableLiveData<>();

    public MainViewModel(@NonNull Application application) {
        super(application);
    }

    public View.OnClickListener homeClick = v -> liveData.postValue(0);
    public View.OnClickListener chatsClick = v -> liveData.postValue(1);
    public View.OnClickListener discoverClick = v -> liveData.postValue(2);
    public View.OnClickListener meClick = v -> liveData.postValue(3);



    public MutableLiveData<Integer> getLiveData() {
        return liveData;
    }
}
